<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 500px;
      height: 500px;
      border: 2px solid #000;
    }

    .child {
      width: 100px;
      height: 100px;
      background-color: red;
      display: inline-block;
    }

    .child2 {
      width: 50px;
      height: 50px;
      background-color: green;
      display: block;
    }
  </style>
</head>

<body>
  <div class="box">
    <div class="child"></div>
    <div class="child"></div>
    <span class="child2">hello</span>
    <span class="child2">word</span>
  </div>
</body>

</html>